<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set image size</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="imagick.exportimagepixels.html">« Imagick::exportImagePixels</a></li>
      <li style="float: right;"><a href="imagick.filter.html">Imagick::filter »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.imagick.html">Imagick</a></li>
    <li>Set image size</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="imagick.extentimage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::extentImage</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::extentImage</span> &mdash; <span class="dc-title">Set image size</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.extentimage-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::extentImage</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$height</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$x</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$y</code></span><br>): <span class="type">bool</span></div>


  <p class="para rdfs-comment">
   Comfortability method for setting image size. The method sets the image size and allows
   setting x,y coordinates where the new area begins.
   此方法在Imagick基于ImageMagick 6.3.1以上版本编译时可用。
  </p>

  <div class="caution"><strong class="caution">警告</strong>
   <p class="para">
  Prior to ImageMagick 6.5.7-8 (1623), $x was positive when shifting to the left and negative when shifting to the right, and $y was positive when shifting an image up and negative when shifting an image down.

  Somewhere betwen ImageMagick 6.3.7 (1591) and ImageMagick 6.5.7-8 (1623), the axes of $x and $y were flipped, so that $x was negative when shifting to the left and positive when shifting to the right, and $y was negative when shifting an image up and positive when shifting an image down.

  Somewhere between ImageMagick 6.5.7-8 (1623) and ImageMagick 6.6.9-7 (1641), the axes of $x and $y were flipped back to pre-ImageMagick 6.5.7-8 (1623) functionality.

   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.extentimage-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">width</code></dt>

     <dd>

      <p class="para">
       The new width
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">height</code></dt>

     <dd>

      <p class="para">
       The new height
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">x</code></dt>

     <dd>

      <p class="para">
       X position for the new size
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">y</code></dt>

     <dd>

      <p class="para">
       Y position for the new size
      </p>
     </dd>

    
   </dl>

  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-imagick.extentimage-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-imagick.extentimage-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="imagick.resizeimage.html" class="function" rel="rdfs-seeAlso">Imagick::resizeImage()</a> - Scales an image</span></li>
    <li class="member"><span class="function"><a href="imagick.thumbnailimage.html" class="function" rel="rdfs-seeAlso">Imagick::thumbnailImage()</a> - Changes the size of an image</span></li>
    <li class="member"><span class="function"><a href="imagick.cropimage.html" class="function" rel="rdfs-seeAlso">Imagick::cropImage()</a> - 截图图片的一块区域</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>